/*
 ------------------------------------------------------------------------------
 Copyright (C) 2009-2011 Eternal Games.

 This file is part of the Eternal Tech source code.

 The Eternal Tech source code is free software; you can redistribute it and/or
 modify it under the terms of the GNU General Public License as published by
 the Free Software Foundation; either version 2 of the License, or (at your
 option) any later version.

 The Eternal Tech source code is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
 or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
 more details.

 You should have received a copy of the GNU General Public License along with
 the Eternal Tech source code; if not, write to the Free Software Foundation, Inc.,
 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 ------------------------------------------------------------------------------
*/


//
// common.h - Commonly used systems in the engine
//

// TODO:
// - Comment functions


#if !defined(__COMMON_H__) || !INCLUDE_GUARDS
#define __COMMON_H__


#define GAME_NAME                       "Vortex"

#define ENGINE_NAME						"Vortex"
#define ENGINE_VERSION					"Vortex 0.1.0 BETA"

#define CONFIG_FILE						"Vortex.cfg"

extern bool					com_initialized;

extern int					com_frameTime;

extern memoryPool_t			*com_cvarMemoryPool;
extern memoryPool_t			*com_cmdMemoryPool;
extern memoryPool_t			*com_parserMemoryPool;
extern memoryPool_t			*com_fileMemoryPool;
extern memoryPool_t			*com_genericMemoryPool;

extern cvar_t				*com_dedicated;
extern cvar_t				*com_developer;
extern cvar_t				*com_logFile;

void				Com_BeginRedirect (int target, char *buffer, int bufferSize, void (*flush)(int target, char *buffer));
void				Com_EndRedirect ();

void				Com_Printf (const char *fmt, ...);
void				Com_DevPrintf (const char *fmt, ...);
void				Com_Error (int code, const char *fmt, ...);

void				Com_Framework ();

void				Com_Init (char *cmdLine);
void				Com_Shutdown ();


#else
FILE_WARNING
#endif   // __COMMON_H__